#!/usr/bin/env python
# coding=utf-8
"""
# @Created on : 2016/04/22 14:12
# @Author     : ldf (ldf@eehello.com)
# @Link       : http://www.eehello.com
# @Version    : 
# 本程序在python2.7下测试通过
"""

import socket
ip_port = ('127.0.0.1', 9999)

sk = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)

while 1:
    inp = raw_input('数据：').strip()
    if inp == 'exit':
        break
    sk.sendto(inp,ip_port)

sk.close()

